<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_forum_topic".
 *
 * @property string $id
 * @property string $forum_id 论坛id
 * @property string $item_id 节id
 * @property string $item_top_id 章id
 * @property string $type 课程公告/课程提问/课程活动/课程讨论/投票/文章/帖子/博客
 * @property string $title 标题
 * @property string $content 主题/内容
 * @property string $status 活动的/已过期/已分享/未分享
 * @property int $vote_type 投票类型：0.无选项；1.单选；2：多选；
 * @property string $allow_image 允许图片消息
 * @property string $allow_voice 允许语音消息
 * @property string $begin_time 开始时间
 * @property string $end_time 结束时间
 * @property int $empirical 经验值
 * @property string $user_name
 * @property string $user_icon
 * @property string $token
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 * @property string $group_way 分组方式
 * @property int $group_way_g 组数
 * @property int $group_way_p 每组人数
 * @property double $total_score 总分
 * @property int $choice_num 选择数
 * @property string $is_show_result 是否立即显示结果
 * @property string $preposition_status 前置状态
 * @property string $validity_period_until 有效期止
 * @property string $preposition_status_by 前置状态操作人
 * @property string $preposition_status_time 前置状态操作时间
 * @property string $old_id
 * @property string $teachProgressType 课堂教学的教学进度，课前teachProgressType.preview，课中teachProgressType.courseware，课后teachProgressType.review
 */
class TForumTopic extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_forum_topic';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['content', 'group_way'], 'string'],
            [['begin_time', 'end_time', 'create_time', 'update_time', 'preposition_status_time'], 'safe'],
            [['empirical', 'del_flag', 'group_way_g', 'group_way_p', 'choice_num'], 'integer'],
            [['total_score'], 'number'],
            [['id', 'forum_id', 'item_id', 'item_top_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['type', 'title', 'status', 'user_icon', 'preposition_status', 'validity_period_until', 'preposition_status_by', 'old_id', 'teachProgressType'], 'string', 'max' => 255],
            [['vote_type'], 'string', 'max' => 4],
            [['allow_image', 'allow_voice', 'token', 'is_show_result'], 'string', 'max' => 64],
            [['user_name'], 'string', 'max' => 32],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'forum_id' => 'Forum ID',
            'item_id' => 'Item ID',
            'item_top_id' => 'Item Top ID',
            'type' => 'Type',
            'title' => '标题',
            'content' => '内容',
            'status' => 'Status',
            'vote_type' => 'Vote Type',
            'allow_image' => 'Allow Image',
            'allow_voice' => 'Allow Voice',
            'begin_time' => '开始时间：',
            'end_time' => '结束时间：',
            'empirical' => 'Empirical',
            'user_name' => 'User Name',
            'user_icon' => 'User Icon',
            'token' => 'Token',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'group_way' => 'Group Way',
            'group_way_g' => 'Group Way G',
            'group_way_p' => 'Group Way P',
            'total_score' => 'Total Score',
            'choice_num' => 'Choice Num',
            'is_show_result' => 'Is Show Result',
            'preposition_status' => 'Preposition Status',
            'validity_period_until' => 'Validity Period Until',
            'preposition_status_by' => 'Preposition Status By',
            'preposition_status_time' => 'Preposition Status Time',
            'old_id' => 'Old ID',
            'teachProgressType' => 'Teach Progress Type',
        ];
    }
}
